﻿<Window
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
        xmlns:local="clr-namespace:ReportingManagement.Components" x:Class="ReportingManagement.Components.ReportMergingEditor" 
        mc:Ignorable="d" WindowStartupLocation="CenterOwner" Title="Report Merging Editor" ShowInTaskbar="False" Height="600" Width="700">

    <Window.Resources>
        <Style x:Key="CheckedBoxListStyle" TargetType="{x:Type ListBox}">
            <Setter Property="SelectionMode" Value="Multiple" />
            <Setter Property="ItemContainerStyle">
                <Setter.Value>
                    <Style TargetType="{x:Type ListBoxItem}">
                        <Setter Property="Margin" Value="2" />
                        <Setter Property="Template">
                            <Setter.Value>
                                <ControlTemplate TargetType="{x:Type ListBoxItem}">
                                    <CheckBox Focusable="False" Content="{Binding ReportName}"
        								IsChecked="{Binding IsSelected, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"/>
                                </ControlTemplate>
                            </Setter.Value>
                        </Setter>
                    </Style>
                </Setter.Value>
            </Setter>
        </Style>
    </Window.Resources>

    <Grid Margin="5">
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>

        <Grid Grid.Row="1" Grid.ColumnSpan="2" Margin="5,0" >
            <Grid.ColumnDefinitions>
                <ColumnDefinition />
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>

            <Button x:Name="btnSave" Content="Save" Grid.Column="0" Width="Auto" HorizontalAlignment="Left" Padding="20,3" IsDefault="True" Click="btnSave_Click" />
            <Button x:Name="btnReset" Content="Reset" Grid.Column="1" Margin="0,0,5,0" Padding="10,3" />
            <Button x:Name="btnCancel" Content="Cancel" Grid.Column="2" Padding="10,3" IsCancel="True" />
        </Grid>
        <local:ReportMergingView x:Name="mergeEditor"/>
    </Grid>

</Window>
